package com.lianyu.wangyiyun.widget;

import android.content.Context;
import android.text.TextUtils;
import android.util.AttributeSet;

/**
 * @author Chen Yuguang
 */
public class MarqueTextView extends androidx.appcompat.widget.AppCompatTextView {

    public MarqueTextView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
        setSingleLine();
        setEllipsize(TextUtils.TruncateAt.MARQUEE);
        setMarqueeRepeatLimit(-1);
    }

    public MarqueTextView(Context context, AttributeSet attrs) {
        this(context, attrs, android.R.attr.textViewStyle);
    }

    public MarqueTextView(Context context) {
        this(context,null);
    }

    @Override

    public boolean isFocused() {
        //就是把这里返回true即可
        return true;
    }
}
